<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 如果变量名与属性名不一致，必须写成下面这样。
        let { foo: baz } = { foo: 'aaa', bar: 'bbb' };
        baz // "aaa"

        let obj = { first: 'hello', last: 'world' };
        let { first: f, last: l } = obj;
        f // 'hello'
        l // 'world'
        
    </script>
</body>

</html>